import {
  Component, OnInit, ViewEncapsulation, ChangeDetectionStrategy, Input, Output,
  EventEmitter
} from '@angular/core';
import {ImageServeService} from "@shared/service/image/image-serve.service";

@Component({
  selector: 'sign-up-list-item',
  templateUrl: './sign-up-list-item.component.html',
  styleUrls: ['./sign-up-list-item.component.scss'],
  encapsulation: ViewEncapsulation.None,
  changeDetection: ChangeDetectionStrategy.OnPush
})
export class SignUpListItemComponent implements OnInit {

  public manIcon: string;
  public womanIcon: string;
  @Input() url: string;
  @Input() sex: string;
  @Input() commingName: string;
  @Input() linkPhone: string;

  @Output() rightBtnClick: EventEmitter<any> = new EventEmitter();

  constructor(private imgService: ImageServeService) {
    this.manIcon = this.imgService.getSexIcon('man');
    this.womanIcon = this.imgService.getSexIcon('woman');
  }

  goEditPage() {
    this.rightBtnClick.emit();
  }

  ngOnInit() {
  }

}
